import * as API from '../utils/api'

export const LOAD_ROAD_SHOW_LIST = 'LOAD_ROAD_SHOW_LIST'
export const UPDATE_ROAD_SHOW_LIST = 'UPDATE_ROAD_SHOW_LIST'

export const loadRoadShowList = function (body) {
    return async function (dispatch)  {
        const list = await API.fetchRoadShowList(body)
        dispatch(updateRoadShowList({
            ...list
        }))
    }
}
export const updateRoadShowList = list => ({type: UPDATE_ROAD_SHOW_LIST, list})